// @ts-ignore
/* eslint-disable */
import { request } from 'umi';

/** 登录接口 POST */
export async function loginAppForPhone(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<LoginData.LoginVo>>('/login/loginAppForPhone', {
    method: 'POST',
    data: options || {},
  });
}

/** 登录接口 免登录 仅使用手机号 POST */
export async function loginNestedAppForPhone(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<LoginData.LoginVo>>('/login/nested', {
    method: 'POST',
    data: options || {},
  });
}

/** 登出接口 POST*/
export async function logout(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<null>>('/login/logout', {
    method: 'POST',
    data: options || {},
  });
}

/** 微信扫码 授权 POST*/
export async function loginAppForWechatCallback(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<LoginData.LoginVo>>('/login/loginAppForWechatCallback', {
    method: 'POST',
    data: options || {},
  });
}

/** 微信扫码 授权 POST*/
export async function loginAppForWechatAuthorize(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<string>>('/login/loginAppForWechatAuthorize', {
    method: 'POST',
    data: options || {},
  });
}

/** 绑定账号 POST  */
export async function loginAppForWechatBindAccount(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<LoginData.LoginVo>>(
    '/login/loginAppForWechatBindAccount',
    {
      method: 'POST',
      data: options || {},
    },
  );
}

/** 根据 手机号 获取绑定状态 POST  */
export async function bindAccountQueryByPhone(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<LoginData.BindAccountQueryByPhoneVo>>(
    '/login/bindAccountQueryByPhone',
    {
      method: 'POST',
      data: options || {},
    },
  );
}

/** 获取绑定用户组织列表 POST  */
export async function bindAccountOrganization(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<AdminOrganizationData.Organization[]>>(
    '/login/bindAccountOrganization',
    {
      method: 'POST',
      data: options || {},
    },
  );
}

/** 获取当前用户的登录单位列表 POST  */
export async function listSelectLoginOrganization(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<LoginData.LoginListSelectOrganizationVo[]>>(
    '/login/listSelectLoginOrganization',
    {
      method: 'POST',
      data: options || {},
    },
  );
}

/** 确认登录组织 POST  */
export async function confirmSelectLoginOrganization(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<LoginData.LoginConfirmSelectLoginOrganizationVo>>(
    '/login/confirmSelectLoginOrganization',
    {
      method: 'POST',
      data: options || {},
    },
  );
}

/** 获取当前的用户 POST  */
export async function currentAccount(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<AccountData.CurrentAccountVo>>('/login/current', {
    method: 'POST',
    data: options || {},
  });
}
